package com.michael.demos.springboot.valid.model;

import com.michael.demos.springboot.valid.groups.F1;
import com.michael.demos.springboot.valid.groups.F2;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;

/**
 * 类功能描述:
 * <pre>
 *   实体 - 装饰物
 * </pre>
 *
 * @author Michael
 * @version 1.0
 * @date 2020/7/29 10:42
 */
@Data
public class Decoration implements Serializable {

    private static final long serialVersionUID = 1L;

    /** 装饰类型 */
    @NotBlank(message = "需要装饰类型", groups = {F1.class})
    private String type;

    /** 装饰颜色 */
    @NotBlank(message = "需要装饰颜色", groups = {F1.class, F2.class})
    private String color;
}
